package com.edu.neusoft.users.controller;

import com.edu.neusoft.users.domain.School;
import com.edu.neusoft.users.service.ISchoolService;
import com.edu.neusoft.users.util.AjaxResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("/school")
@Api(value = "SchoolController" , tags = {"学校表管理接口"})
public class SchoolController {
    @Autowired
    private ISchoolService schoolService;

    @GetMapping("/list")
    @ApiOperation(value = "获取所有学校信息", notes = "返回所有的学校列表信息")
    public AjaxResult list(){
        List<School> schoolList = schoolService.getAllSchoolList();
        return AjaxResult.success(schoolList);
    }

}